/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package bliffoscope.ui;

import java.awt.Color;
import java.awt.Component;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

/**
 *
 * @author ddatta
 */
public class ColorRenderer extends JLabel implements TableCellRenderer  {  
  
    public ColorRenderer() {  
        setOpaque(true); //MUST do this for background to show up.  
    }  
  
    public Component getTableCellRendererComponent(  
                            JTable table, Object value,  
                            boolean isSelected, boolean hasFocus,  
                            int row, int column) {  
  
        //if(column == 4){  
            
            if (column==0)  
            {  
                setBackground(Color.lightGray);  
                //setForeground(Color.BLACK);  
            }  
//            else  
//            {  
//                //setBackground(Color.WHITE);  
//                //setForeground(Color.BLACK);  
//            }  
        //}  
        return this;  
    }  
}  
